<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta  charset="utf-8">
<meta  name="viewport"  content="initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width">
<title>我要流量</title>
<link type="text/css" rel="stylesheet" href="css/e_liuliang.css">
<script src="js/jquery.js" type="text/javascript"></script>
{include file="common/dialog_include.html"}
<script>

function doSubmit() {
	var name = $("#name").val();
	if(name.length == 0) {
		alertWithTime("请输入姓名", 1500);
		return;
	}
	var telreg = /^1[3|4|5|7|8][0-9]\d{8}$/;
	var phone = $("#phone").val();
	if(phone.length == 0) {
		alertWithTime("请输入手机号码", 1500);
		return;
		
	}
	if (!telreg.test(phone)){
		alertWithTime("请输入正确的手机号码", 1500);
		return;
	}
	
	var postData = {
		name: name, 
		phone:phone
	};
	$.ajax({
		url:  "wap.php?m=getWebTraff&a=jpost",
		type: "POST",
		data: postData,
		dataType:"json",
		success: function(res){
			if(res.errmsg != undefined && res.errmsg != null){
				alertWithTime(res.errmsg, 1500);
			}else {
				alertWithTime("申请成功", 1500);
			}
		},
		error: function() {
			alert("error");
		}
		
	});		
}
</script>
</head>
<body>
<div class="body">
	<div class="top">
        <span  class="t_bg">
        	<img src="images/top2.jpg">
        </span>
    </div>
    <div class="center"> 
    	<div class="c_input">
            	<span class="c_bnt" onclick="location.href='wap.php?m=recharge'"><a href="" id="btn_submit" title="我要流量"></a></span>
        </div>
        <div class="c_txt">
        	<p class="c_witer">
            	<span>
            	
                	<img src="images/center2.jpg">
                </span>
            </p>
        </div>
    </div>
    <div class="footer">
    	<div class="f_bg" >
        	<span class="f_img">
            	<img src="images/bottom2.jpg">
            </span>
        </div>
    </div>
</div>

</body>
</html>
